<template>
	<view class="ba-container">
		<!-- <view class="mine-info-container">
			<view style="display: flex; justify-content: space-between; padding: 20rpx;">
				<view>
					<image :src=loginInfo.avatar" style="width: 102rpx; height: 102rpx;"></image>
					<span>{{ loginInfo.name }}</span>
					<span>{{loginInfo.gender?'男':'女'}}</span>
				</view>
				<view class="">
					<view style="box-shadow: 0px 5px 30px rgba(41, 132, 248, 0.298039215686275);font-size: 12px;color: #006EF1;
					    background-color: rgba(255, 255, 255, 1);border: none;border-radius: 32px;width: 160rpx; height: 50rpx;line-height: 50rpx;
						text-align: center;">
						切换签约人
					</view>
				</view>
			</view>
			<view class="">
				<span>身份证号：{{ loginInfo.IDnumber }}</span>
			</view>
			<view class="">
				<span>联系电话:{{ loginInfo.phone }}</span>
			</view>
			<view class="">
				<span>家庭住址:{{ loginInfo.address }}</span>
			</view>
		</view> -->
		<view class="mine-info-container">
			<view style="display: flex; justify-content: space-between; padding: 20rpx;">
				<view style="display: flex;">
					<image src="https://cdn8.axureshop.com/demo/1689476/images/%E7%94%B3%E8%AF%B7%E7%AD%BE%E7%BA%A6/u4309.png" style="width: 102rpx; height: 102rpx;"></image>
					<view style="margin-left: 40rpx;">
						<span>嘟嘟嘟</span>
							<view class="">
								<span>男</span> <span>18岁</span>
							</view>
						</view>
					</view>
				<view class="">
					<view style="box-shadow: 0px 5px 30px rgba(41, 132, 248, 0.298039215686275);font-size: 12px;color: #006EF1;
					    background-color: rgba(255, 255, 255, 1);border: none;border-radius: 32px;width: 160rpx; height: 50rpx;line-height: 50rpx;
						text-align: center;">
						切换签约人
					</view>
				</view>
			</view>
			<!-- <view class="info-item">
				<span>身份证号：{{ loginInfo.IDnumber }}</span>
			</view>
			<view class="info-item">
				<span>联系电话:{{ loginInfo.phone }}</span>
			</view>
			<view class="info-item">
				<span>家庭住址:{{ loginInfo.address }}</span>
			</view> -->
			<view class="info-item">
				<span>身份证号：</span>
			</view>
			<view class="info-item">
				<span>联系电话:17311680083</span>
			</view>
			<view class="info-item">
				<span>家庭住址:成都</span>
			</view>
		</view>
	</view>
	<view style="background-color: #ffffff; width: 100%; padding:  40rpx;">
		<form action="">
			<view class="form-item">
				<view class="form-info">
					<span class="info-first">签约机构</span>
					<span class="info-last">洛西社区卫生服务站</span>
				</view>
			</view>
			<view class="form-item">
				<view class="form-info">
					<span class="info-first">签约团队</span>
					<span class="info-last">李明明团队</span>
				</view>
			</view>
			<view class="form-item">
				<view class="form-info">
					<span class="info-first">签约医生</span>
					<span class="info-last">李明明</span>
				</view>
			</view>
			<view class="form-item">
				<view class="form-info">
					<span class="info-first">服务包</span>
					<span class="info-last">老人服务包</span>
				</view>
			</view>
			<view class="form-item">
				<view class="form-info">
					<span class="info-first">签约周期</span>
					<span class="info-last">1年</span>
				</view>
			</view>
			<view class="form-item">
				<view class="form-info">
					<span class="info-first">生效日期</span>
					<span class="info-last">2020年09月01日</span>
				</view>
			</view>
			<view class="form-item">
				<view class="form-info">
					<span class="info-first">费用</span>
					<span class="info-last" style="color: red;">￥120</span>
				</view>
			</view>
			<view class="form-item">
				<view class="form-info" style="display: flex;">
					<span class="info-first">备注</span>
					<textarea value="" placeholder="请填写备注" style="display: inline-block;width: 
					484rpx;height: 216rpx;background-color: #F2F2F2;border-radius: 12px;padding: 10rpx 20rpx;margin-top: 20rpx;line-height: 40rpx;"/>
				</view>
			</view>
			<view class="form-item">
				<view class="form-info">
					<label>
						<checkbox :value="checkBox" style="transform:  scale(0.7);"/>
						<span style="font-size: 14px;color: #999999;">
						我已阅读并同意
						</span>
						<span style="color: #006EF1;font-size: 14px;">
							《家庭医生签约协议》
							</span>
					</label>
				</view>
			</view>
		</form>
			<view class="application-btn">
				<button style="width: 670rpx; height: 88rpx;background-color: #2984F8;color: #ffffff;" @click="submitBtn">提交申请</button>
			</view>
	</view>
</template>

<script setup>
	import {
		onMounted, ref
	} from 'vue';
	import {
		getResidentsDetailApi
	} from '../../../api/login';
	import {
		useUserStore
	} from '../../../store/user';
	const checkBox = ref('fales');
	onMounted(() => {
		const store = useUserStore();
		const loginInfo = store.userInfo;
	})
	function submitBtn(){
		uni.showModal({
			title: '提示',
			content: '签约申请提交后不可更改，确认提交吗？',
			success: function (res) {
				if (res.confirm) {
					uni.navigateTo({
						url:'/result/pages/result/result'
					})
				} else if (res.cancel) {
					console.log('用户点击取消');
				}
			}
		});
	}
</script>

<style scoped lang="scss">
	.ba-container {
		height: 352rpx;
		background-color: aliceblue;
		display: flex;
		flex-direction: column;
		padding: 20rpx 40rpx;
	}

	.mine-info-container {
		width: 630rpx;
		height: 352rpx;
		padding: 20rpx;
		background-color: #2984F8;
		box-shadow: 0px 5px 30px rgba(41, 132, 248, 0.298039215686275);
		border-radius: 12px;
		color: #ffffff;
	}

	.form-item {
		min-height: 88rpx;
		border-bottom: 1px solid #f2f2f2;
	}

	.form-info {
		line-height: 88rpx;

		.info-first {
			font-size: 14px;
			color: #999999;
			margin-right: 60rpx;
			display: inline-block;
			min-width: 100rpx;
		}
	}
	.application-btn{
		background-color: #ffffff;
		width: 100%;
		height: 160rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		position: fixed;
		top: 90vh;
		left: 0;
	}
	.info-item{
		margin-bottom: 20rpx;
	}
</style>